package com.mt.api.modules.controller;

import com.mt.common.response.WebListResponse;
import com.mt.api.modules.domain.vo.UserRoleMenuVo;
import com.mt.api.modules.service.IBossRoleService;
import com.mt.common.response.WebResponse;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: plover
 * @Date: 2022-04-30
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping("/app/boss/role")
public class BossRoleController {

    @Autowired
    private IBossRoleService bossRoleService;

    @GetMapping("/menu")
    @ApiOperation(value = "", notes = "获取用户菜单接口", httpMethod = "GET")
    public WebResponse getRoleMenu() {
        return bossRoleService.getRoleMenu();
    }

    @GetMapping("/commonMenu")
    @ApiOperation(value = "", notes = "获取用户常用菜单接口", httpMethod = "GET")
    public WebListResponse<UserRoleMenuVo> getRoleCommonMenu() {
        return bossRoleService.getRoleCommonMenu();
    }
}